---
import SearchVue from "./search.vue";
import BaseLayout from "@/layouts/BaseLayout.astro";
import cfg from "blog.config";
const { SearchConfig = {} } = cfg;
---

<BaseLayout title={`搜索 - `}>
  <div class="search white_module">
    {
      SearchConfig.active ? (
        <>
          <h1 class="tips">站内搜索</h1>
          <SearchVue client:load />
        </>
      ) : (
        <h2 class="tips">非常抱歉，本站暂未启用搜索功能！</h2>
      )
    }
  </div>
</BaseLayout>

<style lang="scss">
  .search {
    width: 70% !important;
    margin: 3rem auto;
    padding: 2rem;

    & > .tips {
      text-align: center;
    }
  }

  @media screen and (max-width: 992px) {
    .search {
      width: 95% !important;
    }
  }
</style>
